package com.aaa.dao;

import com.aaa.entity.Activity;
import com.aaa.entity.Type;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;
import java.util.Map;

public interface ActivtyMapper extends BaseMapper<Activity> {
    @Select("select b.name,b.head, a.* from activity a\n" +
            "left join book b on  a.bid=b.id where a.`status`=1 || a.`status`=0")
    List<Map<String,Object>> findactiv();
    @Update("update activity set nums=#{param1} where aid=#{param2}")
    Integer update(Integer num,Integer aid);
}
